﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace miniBoxClassLibrary
{
    public class MemberClass
    {
        private String Text1 = "";
        private int number = 0;
        private String sSQL = String.Empty;
        private String strRt = String.Empty;
        private String sID = String.Empty;
        private String sResult = String.Empty;
        private String sDefaultAddressID = String.Empty;
        private String sMsg = string.Empty;
        private String sLastAddrID = String.Empty;
        private String sMailFromAddress = "service@minichucun.com";
        private String sServiceTelNo = "tel:4008868866";
        private String sServiceTelNo_show = "400-886-8866";
        static private String sKey = "6A????.?";
        static private String sSMS_User = System.Configuration.ConfigurationSettings.AppSettings["SMS_UserID"];
        static private String sSMS_Pwd = System.Configuration.ConfigurationSettings.AppSettings["SMS_Pwd"];
     
        static private String sSMS_Pid = "9";
        static private String sSMS_Sign = "【迷你储存】";
        static private String port = "8080";
        //Product
        static private String sMember_Active_Url = "http://www.minichucun.com";
        static private String sReSetPwd_Url = "http://www.minichucun.com";
        static private String sLogin_Url = "http://www.minichucun.com";
        //Test
        //static private String sMember_Active_Url = "http://60.248.34.96:8080/web/register_2.php";
        //static private String sReSetPwd_Url = "http://60.248.34.96:8080/web/user_member_newpassword.php";
        //static private String sLogin_Url = "http://60.248.34.96:8080/web/login.php";
        public MemberClass()
        {
        }

        public string GetIPAddress()
        {
            string strHostName = System.Net.Dns.GetHostName();
            IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
            IPAddress ipAddress = ipHostInfo.AddressList[0];

            return ipAddress.ToString();
        }
        public String sStatus_Name_Value(int status_id)
        {
            String sResult = string.Empty;
            switch (status_id)
            {
                case 0:
                    sResult = "审核中";
                    break;
                case 5:
                    sResult = "拒绝";
                    break;
                case 10:
                    sResult = "待送空箱";
                    break;
                case 15:
                    sResult = "未送达";
                    break;
                case 17:
                    sResult = "取消";
                    break;
                case 20:
                    sResult = "空箱送达";
                    break;
                case 30:
                    sResult = "待取箱";
                    break;
                case 35:
                    sResult = "未取回";
                    break;
                case 37:
                    sResult = "取消";
                    break;
                case 40:
                    sResult = "取箱完成";
                    break;
                case 50:
                    sResult = "入库检查";
                    break;
                case 55:
                    sResult = "拒绝";
                    break;
                case 60:
                    sResult = "在库";
                    break;
                case 70:
                    sResult = "出仓申请";
                    break;
                case 80:
                    sResult = "捡箱";
                    break;
                case 90:
                    sResult = "运送中";
                    break;
                case 95:
                    sResult = "未送达";
                    break;
                case 97:
                    sResult = "取消";
                    break;
                case 100:
                    sResult = "已送达";
                    break;
                case 110:
                    sResult = "回收箱";
                    break;
                case 500:
                    sResult = "注销箱号";
                    break;
                default:
                    sResult = "其他";
                    break;
            }
            //if(status_id == 1)
            //{ sResult = "待送空箱"; }
            //if (status_id == 2)
            //{ sResult = "入库待取箱"; }
            //if (status_id == 3)
            //{ sResult = "已完成送空箱"; }
            //if (status_id == 4)
            //{ sResult = "已完成入库取箱"; }
            //if (status_id == 5)
            //{ sResult = "已完成出库送箱"; }
            //if (status_id == 6)
            //{ sResult = "出库待送箱"; }
            //if (status_id == 7)
            //{ sResult = "订单審核中"; }
            //if (status_id == 8)
            //{ sResult = "箱子未送達"; }
            //if (status_id == 9)
            //{ sResult = "箱子未取回"; }
            //if (status_id == 10)
            //{ sResult = "拒絕订单"; }
            return sResult;
        }

        //public class Test
        //{
        //    public string ab;
        //    public string cc;
        //}

        public String sReSetUrl_Value
        {
            get { return sReSetPwd_Url; }
        }

        public String sService_TelNo_show_Value
        {
            get { return sServiceTelNo_show; }
        }

        public String sService_TelNo_Value
        {
            get { return sServiceTelNo; }
        }

        public String sLogin_Url_Value
        {
            get { return sLogin_Url; }
        }

        public String sMember_Active_Url_Value
        {
            get { return sMember_Active_Url; }
        }

        public String sSMS_User_Value
        {
            get { return sSMS_User; }
        }

        public String sSMS_Pwd_Value
        {
            get { return sSMS_Pwd; }
        }

        public String sSMS_Pid_Value
        {
            get { return sSMS_Pid; }
        }

        public String sSMS_Sign_Value
        {
            get { return sSMS_Sign; }
        }

        public String sKey_Value
        {
            get { return sKey; }
        }

        public String sMailFromAddress_Value
        {
            //set { sMailFromAddress = "support@Minichucun.com"; }
            get { return sMailFromAddress; }
        }

        public String sMsg_Value
        {
            set { sMsg = value; }
            get { return sMsg; }
        }

        public String sLastAddrID_Value
        {
            set { sLastAddrID = value; }
            get { return sLastAddrID; }
        }

        public String sDefaultAddressID_Value
        {
            set { sDefaultAddressID = value; }
            get { return sDefaultAddressID; }
        }

        public String sResult_Value
        {
            set { sResult = value; }
            get { return sResult; }
        }

        public String sID_Value
        {
            set { sID = value; }
            get { return sID; }
        }
        public String strRt_Value
        {
            set { strRt = value; }
            get { return strRt; }
        }

        public String sSQL_Value
        {
            set { sSQL = value; }
            get { return sSQL; }
        }

        public String Text_Value
        {
            set { Text1 = value; }
            get { return Text1; }
        }

        public int Number_Value
        {
            set { number = value; }
            get { return number; }
        }
    }
}
